<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Upload File</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 20px;
            padding: 20px;
            background-color: #f4f4f4;
        }
        h1 {
            color: #333;
        }
        .upload-form {
            margin-top: 20px;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .upload-form input[type="text"],
        .upload-form input[type="file"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }
        .upload-form button {
            padding: 10px 20px;
            background-color: #28a745;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .upload-form button:hover {
            background-color: #218838;
        }
        .result-info {
            margin-top: 20px;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        .back-link {
            display: inline-block;
            margin-top: 20px;
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            text-decoration: none;
            border-radius: 5px;
            transition: background-color 0.3s;
        }
        .back-link:hover {
            background-color: #0056b3;
        }
    </style>
</head>
<body>
<h1>上传文件</h1>
<div class="upload-form">
    <form th:action="@{/video/upload}" method="post" enctype="multipart/form-data">
        <div>
            <label for="title">标题:</label>
            <input type="text" id="title" name="title" required>
        </div>
        <div>
            <label for="file">文件:</label>
            <input type="file" id="file" name="file" required>
        </div>
        <div>
            <label for="remark">描述:</label>
            <input type="text" id="remark" name="remark">
        </div>
        <div>
            <label for="openStatus">是否公开:</label>
            <input type="checkbox" id="openStatus" name="openStatus">
        </div>
        <button type="submit">上传</button>
    </form>
</div>
<div class="result-info" th:if="${information != null}">
    <p th:text="${information}"></p>
    <a th:href="@{/video/mainpage}" class="back-link">返回主页面</a>
</div>
</body>
</html>